//
//  UIApplication+Helper.m
//  GSBlockChain
//
//  Created by guoshikeji_a on 2018/12/17.
//  Copyright © 2018 guoshikeji. All rights reserved.
//

#import "UIApplication+Helper.h"

@implementation UIApplication (Helper)

+ (void)callPhone:(NSString *)phone {
    if (!phone.length) {
        phone = @" ";
    }
    NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"tel://%@",phone]];
    if (@available(iOS 10.0,*)) {
        [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:^(BOOL success) {
            
        }];
    }else {
        [[UIApplication sharedApplication] openURL:url];
    }
}

@end
